<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>编辑员工</title>
</head>
<body>
<h2>编辑员工信息</h2>
<form th:action="@{/update}" method="post">
    <input type="hidden" th:field="*{emp.id}" />
    <table>
        <tr>
            <td>姓名:</td>
            <td><input type="text" th:field="*{emp.name}" required/></td>
        </tr>
        <tr>
            <td>部门名称:</td>
            <td><input type="text" th:field="*{emp.deptName}" required/></td>
        </tr>
        <tr>
            <td>第一月工资:</td>
            <td><input type="number" th:field="*{emp.firstSal}" required/></td>
        </tr>
        <tr>
            <td>第二月工资:</td>
            <td><input type="number" th:field="*{emp.secondSal}" required/></td>
        </tr>
    </table>
    <button type="submit">更新</button>
</form>
<a href="/list">返回查询列表</a>
</body>
</html>-->
<!--
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑员工</title>
    &lt;!&ndash; Tailwind CSS &ndash;&gt;
    <script src="https://cdn.tailwindcss.com"></script>
    &lt;!&ndash; Font Awesome &ndash;&gt;
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">

    &lt;!&ndash; 配置Tailwind自定义颜色 &ndash;&gt;
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3b82f6', // 蓝色主色调
                        neutral: {
                            100: '#f3f4f6',
                            200: '#e5e7eb',
                            800: '#1f2937',
                        }
                    },
                },
            }
        }
    </script>
</head>
<body class="bg-gray-50 font-sans text-neutral-800 min-h-screen flex flex-col">
&lt;!&ndash; 页面头部 &ndash;&gt;
<header class="bg-white shadow-sm sticky top-0 z-10">
    <div class="container mx-auto px-4 py-4 flex justify-between items-center">
        <div class="flex items-center space-x-2">
            <i class="fa fa-users text-primary text-2xl"></i>
            <h1 class="text-xl font-bold text-neutral-900">员工管理系统</h1>
        </div>
        <div class="flex items-center space-x-4">
            <button class="text-neutral-600 hover:text-primary transition-colors">
                <i class="fa fa-bell"></i>
            </button>
            <div class="w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary">
                <i class="fa fa-user"></i>
            </div>
        </div>
    </div>
</header>

&lt;!&ndash; 主内容区 &ndash;&gt;
<main class="flex-grow container mx-auto px-4 py-8">
    <div class="mb-8 flex flex-col md:flex-row md:items-center md:justify-between gap-4">
        <div>
            <h2 class="text-2xl font-bold text-neutral-900">编辑员工信息</h2>
            <p class="text-neutral-600 mt-1">修改以下信息并保存以更新员工记录</p>
        </div>
        <a href="/list" class="inline-flex items-center px-4 py-2 bg-white border border-neutral-300 rounded-lg text-sm font-medium text-neutral-700 hover:bg-neutral-50 transition-colors">
            <i class="fa fa-arrow-left mr-2"></i>
            返回员工列表
        </a>
    </div>

    &lt;!&ndash; 表单卡片 &ndash;&gt;
    <div class="bg-white rounded-xl shadow-sm overflow-hidden max-w-md mx-auto">
        <div class="p-6">
            <form th:action="@{/update}" method="post">
                <input type="hidden" th:field="*{emp.id}" />
                <div class="space-y-6">
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="md:col-span-1">
                            <label for="name" class="block text-sm font-medium text-neutral-700 mb-1">姓名</label>
                        </div>
                        <div class="md:col-span-2">
                            <div class="relative">
                  <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-500">
                    <i class="fa fa-user"></i>
                  </span>
                                <input type="text" th:field="*{emp.name}" id="name" required
                                       class="block w-full pl-10 pr-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all"
                                       placeholder="请输入员工姓名">
                            </div>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="md:col-span-1">
                            <label for="deptName" class="block text-sm font-medium text-neutral-700 mb-1">部门</label>
                        </div>
                        <div class="md:col-span-2">
                            <div class="relative">
                  <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-500">
                    <i class="fa fa-building"></i>
                  </span>
                                <input type="text" th:field="*{emp.deptName}" id="deptName" required
                                       class="block w-full pl-10 pr-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all"
                                       placeholder="请输入所属部门">
                            </div>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="md:col-span-1">
                            <label for="firstSal" class="block text-sm font-medium text-neutral-700 mb-1">第一月工资</label>
                        </div>
                        <div class="md:col-span-2">
                            <div class="relative">
                  <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-500">
                    <i class="fa fa-money"></i>
                  </span>
                                <input type="number" th:field="*{emp.firstSal}" id="firstSal" required
                                       class="block w-full pl-10 pr-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all"
                                       placeholder="请输入第一月工资" min="0" step="0.01">
                            </div>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="md:col-span-1">
                            <label for="secondSal" class="block text-sm font-medium text-neutral-700 mb-1">第二月工资</label>
                        </div>
                        <div class="md:col-span-2">
                            <div class="relative">
                  <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-500">
                    <i class="fa fa-money"></i>
                  </span>
                                <input type="number" th:field="*{emp.secondSal}" id="secondSal" required
                                       class="block w-full pl-10 pr-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all"
                                       placeholder="请输入第二月工资" min="0" step="0.01">
                            </div>
                        </div>
                    </div>

                    <div class="pt-4 flex justify-end space-x-3">
                        <button type="button" onclick="history.back()"
                                class="inline-flex justify-center py-2 px-4 border border-neutral-300 shadow-sm text-sm font-medium rounded-lg text-neutral-700 bg-white hover:bg-neutral-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-all">
                            取消
                        </button>
                        <button type="submit"
                                class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-lg text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-all">
                            <i class="fa fa-save mr-2"></i>
                            更新员工信息
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    &lt;!&ndash; 提示卡片 &ndash;&gt;
    <div class="mt-8 bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg max-w-md mx-auto">
        <div class="flex">
            <div class="flex-shrink-0">
                <i class="fa fa-info-circle text-blue-500"></i>
            </div>
            <div class="ml-3">
                <p class="text-sm text-blue-700">
                    <strong>提示：</strong>所有带 <span class="text-red-500">*</span> 的字段为必填项。修改后点击"更新员工信息"保存更改。
                </p>
            </div>
        </div>
    </div>
</main>

&lt;!&ndash; 页脚 &ndash;&gt;
<footer class="bg-white border-t border-neutral-200 py-6 mt-12">
    <div class="container mx-auto px-4">
        <div class="flex flex-col md:flex-row md:justify-between md:items-center">
            <div class="mb-4 md:mb-0">
                <p class="text-neutral-600 text-sm">© 2025 员工管理系统. 保留所有权利.</p>
            </div>
            <div class="flex space-x-6">
                <a href="#" class="text-neutral-600 hover:text-primary transition-colors">
                    <i class="fa fa-github"></i>
                </a>
                <a href="#" class="text-neutral-600 hover:text-primary transition-colors">
                    <i class="fa fa-twitter"></i>
                </a>
            </div>
        </div>
    </div>
</footer>
</body>
</html>
-->
